import request from '@/utils/request'

const LOGIN = '/login'

export function login(data) {
  return request({
    // url: '/vue-element-admin/user/login',
    url: LOGIN,
    method: 'post',
    data
  })
}

export function getInfo(id,type) {
  return request({
    url: LOGIN + '/' + id + "/" + type,
    method: 'get'
  })
}

export function logout() {
  return request({
    url: LOGIN,
    method: 'delete'
  })
}
